#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i,j;
	char a[300],b[300],c[300],d[300],e[300];
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c>>d>>e;
		cout<<a<<","<<b<<","<<c<<","<<d<<","<<e<<endl;
	}
    return 0;
}
